<?php

namespace app\common\model;

use think\Model;

/**
 * 订阅发送失败记录
 */
class NotificationLog extends Model
{

    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    // 追加属性
    protected $append = [

    ];

    public static function add_log($type,$oper_id,$errcode,$errmsg)
    {
        return self::create([
            'type'          => $type,
            'oper_id'       => $oper_id,
            'errcode'       => $errcode,
            'errmsg'        => $errmsg,
        ]);
    }


}
